home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************************
- *
- * TrafficLights.h -- constants for the TrafficLights code and resources
- *
- * Developer Support Center
- * Apple Computer, Inc.
- * Copyright 1988-1993, Apple Computer, Inc. All rights reserved.
- *
- * This file contains constant definitions for the TrafficLights code, including
- * dialog IDs, resource IDs, defaults and the like.
- *
- ******************************************************************************/
-
- /******************************************************************************
- *
- * Which version:
- *
- * MPW users can define this in the makefile, but SARez or THINK Rez users
- * can't (though you can set it with THINK Rez and THINK C 6.0). Since
- * there's no consistent way to externally define this across development
- * environments, we define it here.
- *
- ******************************************************************************/
-
- #define PascalVersion
- #undef CVersion
-
- /* Constants dealing with defaults */
-
- #define kMaxCircles 10 /* For static arrays, there has to be a limit */
- #define kDefaultNum 3 /* Default number of circles per document */
- #define rWindow 128 /* The 'WIND' resource we use */
-
- #define rDefaultFonts 1000 /* 'STR#' resource with default font names */
- #define rDefaultStrings 1001 /* 'STR#' resoruce with default circle texts */
- #define rDefaultSizes 1000 /* 'DfSz' resource with default text sizes */
- #define rDefaultColorID 1000 /* 'RGB ' resource with default color */
-
- /* Constants for alerts for errors we might encounter */
-
- #define rNoMemForWindow 2000 /* No memory for new window or document */
- #define rReallyRevert 2010 /* Alert asking if it's OK to revert */
- #define rNoMemoryForOperation 2011
- /* Alert saying we can't do the modify
- circle dialog because there's no memory */
-
- /* Constants having to do with the preferences file */
-
- #define rPrefsFileName 128 /* 'STR ' resource containing the preferences
- file name */
- #define kSamplePrefsType 'Pref' /* File type of our preferences file */
- #define kSamplePrefsRsrc 'Pref' /* Resource type of the prefs resource in it */
-
- /* Define the OSType for the creator for documents we create */
-
- #ifdef PascalVersion
- #define kOurCreatorType 'DSp1'
- #endif
-
- #ifdef CVersion
- #define kOurCreatorType 'DSc1'
- #endif
-
- /* Constants for the files we save */
-
- #define kOurDocumentType 'DSp1' /* the file type for our documents */
-
- #define kFileInternalVersionID 1 /* internal version number for our file
- format; we can't read files if the
- version inside them is bigger than
- this value */
- #define rMiscStrings 1004 /* Miscellaneous file-related strings */
- #define kSaveFileAs 1 /* "Save current document as:" */
- #define kPickColor 2 /* "Select a color for this circle." */
-
- /* Options for the dirty flag for documents */
-
- #define kDocumentDirty 1 /* Document needs saving to disk */
- #define kDocumentNew 2 /* Document is new -- enable save but don't
- prompt to save when closing */
- #define kDocumentClean 3 /* Document is saved to disk */
-
- /* Constants for balloon help resources */
-
- #define kActiveCircleBalloonString 43 /* Balloon help string for active circle */
- #define kInactiveCircleBalloonString 44 /* Balloon help string for inactive one */
- #define rBalloonHelpStringID 500 /* 'STR#' with most balloon help strings */
-
- /* Constants for memory cushions and safeguards */
-
- #define kDialogMemorySize 16 * 1024 /* We require this much memory available
- in our heap to do the modify circle
- dialog, realistically */
- #define kMemoryCushionSize 16 * 1024 /* To keep breathing room in our heap,
- we won't open a new window unless
- this much space is available in our
- heap. */
-
- /* Constants defining TrafficLight-specific menus. Menus start with "m"
- and items start with "i". */
-
- #define mCircle 131 /* the Circle menu ID */
- #define iAdd 1
- #define iModify 2
- #define iDelete 3
-
-